function login(){
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "rest/user/login",
        data: {
            userName: $("#un").val(),
            password: $("#pw").val()
        },
        success: function(data) {
            window.location.href="rest/user/toFind";
        }
    });
}